{include file="public/header" /}
<style>
    .my-order-btn{
        margin-top: 10px;
    }
    .product_title{
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    .product_title p:first-child{
        width: 65% !important;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .my-order-list .order-price {
        flex: 1;
    }
</style>
<body>
<div class="header">
    <span class="layui-icon layui-icon-left" onclick="load_href('{:url(\'user/index\')}',2)"></span> 我的缔造
</div>
<ul class="my-order-nav bgc">
    <li data-type="" class="{if !$Request.param.type}active{/if}">全部</li>
    <li data-type="4" class="{if $Request.param.type == 4}active{/if}">缔造中</li>
    <li data-type="1" class="{if $Request.param.type == 1}active{/if}">绿色权益</li>
    <li data-type="2" class="{if $Request.param.type == 2}active{/if}">红色权益</li>
    <li data-type="3" class="{if $Request.param.type == 3}active{/if}">黄色权益</li>
</ul>
<ul class="my-order-list tpl_list"></ul>
<script id="template" type="text/html">
    {{# for(var i=0;i < d.data.length ;i++){ }}
    <li>
        <div>
            <div class="title flex-layout">缔造场次：{{d.data[i].create_times}}&nbsp;{{d.data[i].type==1?"上午场":"下午场"}}  <span class="bc">{{d.data[i].status_texts}}</span></div>
            <div class="product_title">
                <p>{{d.data[i].product.title}}</p>
                <p class="order-price" style="padding-bottom: .7rem;">奖励：<span>{{d.data[i].free==2?"已结算":"未结算"}}</span></p>
            </div>
        </div>
    </li>
    {{# } }}
</script>
</body>
{include file="public/footer"/}
<script>
    $(function () {
        getFlow('{$Request.param.type?:""}', "{:url('wholesale/getOrderList')}");
        $('.my-order-nav li').click(function () {
            $(".tpl_list").empty();
            getFlow($(this).attr('data-type'), "{:url('wholesale/getOrderList')}");
            $(this).addClass('active').siblings().removeClass('active')
        });
    })
</script>
</html>